﻿namespace Repositories.BDS;

/// <summary>
/// BDS场地
/// </summary>
public class BDS_Site
{
    /// <summary>
    /// 主键
    /// </summary>
    public int id { get; set; }

    /// <summary>
    /// 场地code
    /// </summary>
    public string code { get; set; }

    /// <summary>
    /// 场地名称
    /// </summary>
    public string name { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int sort { get; set; }

    /// <summary>
    /// 父级id
    /// </summary>
    public dynamic pid { get; set; }

    /// <summary>
    /// 场地大类型（1：学校,2：校区，3：楼，4：场地,5：分校,6：楼层）
    /// </summary>
    public int type { get; set; }

    private object sitetype;
    /// <summary>
    /// 场地类型
    /// </summary>
    public object Sitetype
    {
        get
        {
            return sitetype;
        }
        set
        {
            if (value != null && (value.GetType() == typeof(Int16) || value.GetType() == typeof(Int32) || value.GetType() == typeof(Int64)))
                sitetype = Convert.ToInt32(value) == 0 ? null : value;
            else
                sitetype = value;
        }
    }

    private object organization;
    /// <summary>
    /// 负责单位
    /// </summary>
    public object Organization
    {
        get
        {
            return organization;
        }
        set
        {
            if (value != null && (value.GetType() == typeof(Int16) || value.GetType() == typeof(Int32) || value.GetType() == typeof(Int64)))
                organization = Convert.ToInt32(value) == 0 ? null : value;
            else
                organization = value;
        }
    }

    private object administrator;
    /// <summary>
    /// 场地管理员
    /// </summary>
    public object Administrator
    {
        get
        {
            return administrator;
        }
        set
        {
            if (value != null && (value.GetType() == typeof(Int16) || value.GetType() == typeof(Int32) || value.GetType() == typeof(Int64)))
                administrator = Convert.ToInt32(value) == 0 ? null : value;
            else
                administrator = value;
        }
    }

    private object experimentaldept;
    /// <summary>
    /// 实验室科室
    /// </summary>
    public object Experimentaldept
    {
        get
        {
            return experimentaldept;
        }
        set
        {
            if (value != null && (value.GetType() == typeof(Int16) || value.GetType() == typeof(Int32) || value.GetType() == typeof(Int64)))
                experimentaldept = Convert.ToInt32(value) == 0 ? null : value;
            else
                experimentaldept = value;
        }
    }

    /// <summary>
    /// 建制年份
    /// </summary>
    public int? buildyear { get; set; }

    /// <summary>
    /// 面积（单位：平方米）
    /// </summary>
    public double? area { get; set; }

    /// <summary>
    /// 容纳人数
    /// </summary>
    public int? capacity { get; set; }

    /// <summary>
    /// 场地位置
    /// </summary>
    public string position { get; set; }

    /// <summary>
    /// 场地介绍
    /// </summary>
    public string description { get; set; }

    /// <summary>
    /// 场地照片
    /// </summary>
    public string photo { get; set; }

    /// <summary>
    /// 是否启用（1：启用，2：禁用）
    /// </summary>
    public int enable { get; set; }

    /// <summary>
    /// 是否删除（1：未删除，2：已删除）
    /// </summary>
    public int isdelete { get; set; }
}
